<template>
  <el-checkbox-group v-model="input" @change="handleCheck" :style='cssstyle' :disabled="disabled">
    <el-checkbox v-for="( item, index ) in options" :key="index" :label="item.value">{{item.label}}</el-checkbox>
  </el-checkbox-group>
</template>
<script>
export default {
  name: 'Checkbox',
  data() {
    return {
      input: [],
    }
  },
  props: {
    cssstyle:{
      type:Object,
      default(){
        return {}
      }
    },
    options : {
      type: Array,
      default(){
        return []
      }
    },
    field: {
      type: String,
      default: ''
    },
    disabled:{
      type: Boolean,
      default: false
    }
  },
  methods: {
    handleCheck(val) {
      this.$emit('click', {val: val, field: this.field})
    }
  },
}
</script>

<style>
</style>
